﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using PictureBoard4;


namespace PictureBoard4.Shape
{
    /// <summary>
    /// 工厂类
    /// </summary>
  public class FactoryShape
    {
      public static Shape CreateShape()
      {
          switch (Tool.ToolStyle)
          {
              case ToolStyle.Line:
                  return new Line();
              case ToolStyle.Pencil:
                  return new Pencil();
              case ToolStyle.Image:
                  return new CarveImage();
              case ToolStyle.Ellipse:
                  return new Ellipse();
              case ToolStyle.Eraser:
                  return new Eraser();
              case ToolStyle.Rectangles:
                  return new Rectangles();
              case ToolStyle.Triangle:
                  return new Triangle();
              default:
                  return null;
          }
      }
    }
}
